<?php
//获取session
echo "获取session";
echo "<br/>";
session_start();
print_r($_SESSION);
echo "<br/>";
print_r($_SESSION['name']);
echo "<br/>";
echo "数组是";
$arr=$_SESSION[arr];
print_r($arr);
//3.取出对象
class Dog{
    private $name;
    private $age;
    function __construct($name,$age){
        $this->name=$name;
        $this->age=$age;
    }
    public function getName(){
        return $this->name;
    }
}
echo "<br/>";
echo "取出对象";
$dog=$_SESSION['dog'];
echo $dog->getName();
?>
